import fetch from 'common/src/utils/fetch';
import baseUrl from './env';
// 查询接口
function search(data) {
    return fetch({
        url: `${baseUrl}/race/getList`,
        method: 'post',
        data
    });
}
// 新增
function prizeAdd(data) {
    return fetch({
        url: `${baseUrl}/race/insert`,
        method: 'post',
        data
    });
}
// 编辑提交
function prizeUpdate(data) {
    return fetch({
        url: `${baseUrl}/race/update`,
        method: 'post',
        data
    });
}
// 删除
function prizeDelete(data) {
    return fetch({
        url: `${baseUrl}/race/delete`,
        method: 'post',
        data
    });
}
// 通过竞赛类型获取竞赛名称
function getCompetitionNameByLevel(data) {
    return fetch({
        url: `${baseUrl}/race/getList/all`,
        method: 'post',
        data
    });
}
const competitionAwardsApi = {
    search,
    prizeAdd,
    prizeDelete,
    prizeUpdate,
    getCompetitionNameByLevel
};
export default competitionAwardsApi;

